/*
 * @Author: sunzhijun 
 * @Date: 2019-08-15 20:36:25 
 * @Last Modified by: sunzhijun
 * @Last Modified time: 2020-01-09 11:58:42
 */

 import React from 'react';
 import { render } from 'src/hrpub/common/frame';
 import { base } from 'nc-lightapp-front';
 import './index.less';
 import TerminationAction from './action/index';
 import TableAction from '../../actions/table';
 import HeaderAction from '../../actions/header';
 import BtnAction from '../../actions/btn';
 const TerminationModal = render({
    actions: { 
        terminationAct : TerminationAction,
        tableAct: TableAction,
        headerAct: HeaderAction,
        btnAct: BtnAction
    }
 })(({ props, action, state}) => {
    const { NCModal, NCButton, NCDatePicker } = base;
    const { main, form } = props;
    const { language } = main;
    return(
        <React.Fragment>
            <NCModal
                show={ main.terminationModalVisible }
                size="sm"
                className="termination-modal"
                onHide={ action.terminationAct.hiddenModal }
                // onEntered={this.showHandle}
                backdrop="static"
            >
                <NCModal.Header
                    closeButton={true}
                >
                    {/* 国际化处理： 终止关系设置 */}
                    {language['hi6007-000293']}
                </NCModal.Header>
                <NCModal.Body>
                    <div className="data-picker-con">
                        {
                            form.createForm('stopPoi')
                        }
                        {/* <div className="date-picker-title">
                            终止日期
                        </div>
                        <div className="date-picker">
                            <NCDatePicker value={main.defaultTime} onChange={ action.terminationAct.changeTime } />
                        </div> */}
                    </div>
                </NCModal.Body>
                <NCModal.Footer>
                    <NCButton
                        colors="primary"
                        onClick={ action.terminationAct.termination }
                    >
                        {/* 国际化处理： 确认 */}
                        {language['hi6007-000174']}
                    </NCButton>
                    <NCButton
                        colors="secondary"
                        onClick={ action.terminationAct.hiddenModal }
                    >
                        {/* 国际化处理： 取消 */}
                        {language['hi6007-000005']}
                    </NCButton>
                </NCModal.Footer>
            </NCModal>
        </React.Fragment>
    )
 })

 export default TerminationModal;